home *** CD-ROM | disk | FTP | other *** search
- /*
- * Copyright 1993, 1994, Silicon Graphics, Inc.
- * All Rights Reserved.
- *
- * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
- * the contents of this file may not be disclosed to third parties, copied or
- * duplicated in any form, in whole or in part, without the prior written
- * permission of Silicon Graphics, Inc.
- *
- * RESTRICTED RIGHTS LEGEND:
- * Use, duplication or disclosure by the Government is subject to restrictions
- * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
- * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
- * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
- * rights reserved under the Copyright Laws of the United States.
- */
- /*
- ripple.h
- Drew Olbrich, 1992
- */
-
- #ifndef _RIPPLE
- #define _RIPPLE
-
- #include "defs.h"
-
- #define RIPPLE_LENGTH 2048
- #define RIPPLE_CYCLES 18
- #define RIPPLE_AMPLITUDE 0.125
- #define RIPPLE_STEP 7
- #define RIPPLE_COUNT 7
-
- typedef struct { /* precomputed displacement vector table */
- float dx[2];
- int r; /* distance from origin, in pixels */
- } RIPPLE_VECTOR;
-
- typedef struct { /* precomputed ripple amplitude table */
- float amplitude;
- } RIPPLE_AMP;
-
- typedef struct {
- float x[2]; /* initial vertex location */
- float t[2]; /* texture coordinate */
- float dt[2]; /* default texture coordinate */
- } RIPPLE_VERTEX;
-
- extern RIPPLE_VECTOR ripple_vector[GRID_SIZE_X][GRID_SIZE_Y];
- extern RIPPLE_AMP ripple_amp[RIPPLE_LENGTH];
-
- void ripple_init();
- void ripple_dynamics(int mousex, int mousey);
- void ripple_redraw();
- void ripple_click(int mousex, int mousey, int state);
-
- #endif
-